export default {
  name: 'BaseDragItem',
  props: {
    attrs: Object,
    extendAttrs: Object,
    type: String,
    properties: Object,
    children: Array,
    form: Object,
    disableItem: {
      type: Boolean,
      required: false,
      default: false
    }
  },
  methods: {
    isShow(properties) {
      if (properties.ifCondition) {
        // eslint-disable-next-line no-eval
        return eval(
          '(formValue,$hasRole,$hasPermission,disableItem)=>{return ' + properties.ifCondition + '}'
        )(this.form, this['$hasRole'], this['$hasPermission'], this.disableItem)
      }
      return true
    }
  }
}
